package service

import (
	"organoid_public/domain/common/model"
	"organoid_public/domain/common/repository"
	"organoid_public/pkg/logger"
)

type CommonService struct {
	log                  logger.Logger
	dictionaryDetailRepo repository.DictionaryDetail
}

func NewCommonService(log logger.Logger, dictionaryDetailRepo repository.DictionaryDetail) Service {
	return &CommonService{
		log:                  log,
		dictionaryDetailRepo: dictionaryDetailRepo,
	}
}

func (c *CommonService) GetEnum(name []string) ([]model.ConfigDictionaryDetail, error) {
	return c.dictionaryDetailRepo.GetDictionaryEnum(name)
}
